<?php

namespace common\models\ar;

use Yii;

/**
 * This is the model class for table "money_order".
 *
 * @property int $id
 * @property string $userID 用户ID
 * @property int $user_type 状态 1待审核 2 通过 3拒绝
 * @property string $money_order 订单编号
 * @property string $time 时间
 * @property string $value 图片编码
 * @property string $Explain
 * @property int $moneys 线下入金金额
 */
class MoneyOrder extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'money_order';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['userID', 'money_order', 'time'], 'required'],
            [['value', 'Explain'], 'string'],
            [['moneys'], 'integer'],
            [['userID'], 'string', 'max' => 11],
            [['user_type'], 'string', 'max' => 5],
            [['money_order', 'time'], 'string', 'max' => 20],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'userID' => 'User ID',
            'user_type' => 'User Type',
            'money_order' => 'Money Order',
            'time' => 'Time',
            'value' => 'Value',
            'Explain' => 'Explain',
            'moneys' => 'Moneys',
        ];
    }
}
